'use strict';


function collect_all_even(collection) {

   // 编写代码满足测试要求
   var a =[]
   var j =0;
   for(var i =0 ;i<collection.length;i++){
     if(collection[i]%2===0){
       a[j++]=collection[i]
      
     }
   }
   return a;
    


}


module.exports = collect_all_even;